/*
 * @Author: wwssaabb
 * @Date: 2021-07-14 11:28:19
 * @LastEditTime: 2021-07-14 11:35:29
 * @FilePath: \demo\blog_demo\model\comment.js
 */

const mongoose = require('mongoose')

const Comment=mongoose.model('comment',new mongoose.Schema({
  aid:{   //文章id
    type:mongoose.Schema.Types.ObjectId,
    ref:'article'
  },
  uid:{   //评论人id
    type:mongoose.Schema.Types.ObjectId,
    ref:'user'
  },
  time:{    //评论时间
    type:Date
  },
  content:{   //评论内容
    type:String
  }
}))

module.exports=Comment


